package com.yu1996.search.pojo;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

@Data
@Document(indexName = "tensquare_search", type = "article")
public class Article {

    @Id
    private String id;//ID

    //是否索引   是否可以被搜索到
    //是否分词   是否将搜索的内容进行分词搜索
    //是否存储   写在改对象中的字段都是需要存储的
    @Field(index = true,  analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String title;


    @Field(index = true,  analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String content;


    private String state;//审核状态
}
